#ifndef WEATHER_H
#define WEATHER_H

#include <Arduino.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
#include <string.h>
#include "serial.h"
#include "OLED.h"

#define WEATHER_API_KEY   "SrwDD6bSRRPrR5ttU"
#define WEATHER_CITY_CODE "WTQ3VZQP879N"
#define WEATHER_URL       "http://api.seniverse.com/v3/weather/daily.json?key=%s&location=%s&language=zh-Hans&unit=c&start=0&days=1"

struct WeatherInfo{
  String city;
  String weather;
  String hightemp;
  String lowtemp;
};

void weather_Init();
bool weather_update();
void get_weatherInfo();

#endif
